<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <!-- <div id="app">
            <mycom3></mycom3>
    </div> -->
    <div id="app2">
            <login></login>
    </div>

    <!-- 在 被控制的 #app 外面,使用 template 元素,定义组件的HTML模板结构  -->
    <template id="tmp1">
        <div>
            <h1>这是通过 template 元素,在外部定义的组件结构,这个方式,有代码的智能提示和高亮</h1>
            <h4>好用,不错!</h4>
        </div>
    </template>
    <template id="tmp2">
            <div>
                <h1>这是私有组件</h1>
                <h4>好用,不错!</h4>
            </div>
        </template>


    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        Vue.component('mycom3',{
            template:'#tmp1'
        })

        var vm = new Vue({
            el: '#app',
            data: {},
            methods: {}
        });

        var vm2 =new Vue({
            el:'#app2',
            data:{},
            methods:{},
            computed:{},
            filters:{},
            directives:{},
            components:{//定义实例内部私有组件
                login:{
                    template:'#tmp2'
                }

            },
            
            beforeCrate(){},
            created(){},
            beforeMount(){},
            mounted(){},
            beforeUpdate(){},
            updated(){},
            beforeDestory(){},
            destoryed(){}

        })
    </script>
</body>

</html>